FROM node:10.15.0-alpine

RUN apk --update add tzdata \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata

RUN mkdir -p ./api
WORKDIR ./api

COPY ./package.json ./package.json
COPY ./ ./

RUN npm i --registry=https://registry.npm.taobao.org

EXPOSE 7001
CMD [ "npm", "start" ]
